﻿<UserControl x:Class="WpfKinectUserControls.KinectFilteringParamsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             Loaded="uc_Loaded"
             x:Name="uc"
             d:DesignHeight="100" d:DesignWidth="200">
    <Grid Margin="0">
        <Grid.Resources>
            <Style TargetType="Label">
                <Setter Property="FontSize" Value="10"/>
                <Setter Property="Margin" Value="0"/>
                <Setter Property="Padding" Value="0"/>
            </Style>
            <Style TargetType="TextBox">
                <Setter Property="FontSize" Value="10"/>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="0.5*"/>
        </Grid.ColumnDefinitions>
        <Label Content="Smoothing" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0"/>
        <Label Content="Correction" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1"/>
        <Label Content="Prediction" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2"/>
        <Label Content="Jitter Radius" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"/>
        <Label Content="MaxDeviationRadius" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4"/>
        <Label Content="m" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="2" Grid.Row="3"/>
        <Label Content="m" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="2" Grid.Row="4"/>
        <TextBox Text="{Binding ElementName=uc, Path=Smoothing, Mode=TwoWay}" Name="tbSmoothing" HorizontalAlignment="Center" Width="75" Grid.Row="0" Grid.Column="1"/>
        <TextBox Text="{Binding ElementName=uc, Path=Correction, Mode=TwoWay}"  Name="tbCorrection" HorizontalAlignment="Center" Width="75" Grid.Row="1" Grid.Column="1"/>
        <TextBox Padding="0" Margin="0" Text="{Binding ElementName=uc, Path=Prediction, Mode=TwoWay}"  Name="tbPrediction" HorizontalAlignment="Center" Width="75" Grid.Row="2" Grid.Column="1"/>
        <TextBox Text="{Binding ElementName=uc, Path=JitterRadius, Mode=TwoWay}" Name="tbJitterRadius" HorizontalAlignment="Center" Width="75" Grid.Row="3" Grid.Column="1"/>
        <TextBox Text="{Binding ElementName=uc, Path=MaxDeviationRadius, Mode=TwoWay}" Name="tbMaxDeviationRadius" HorizontalAlignment="Center" Width="75" Grid.Row="4" Grid.Column="1"/>
        <Button IsEnabled="True" ToolTip="Set all parameters." Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="25" Click="Button_Click">
            <Image Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Source="Resources/Very-Basic-Checked-checkbox-icon.png"/>
        </Button>
        <Button IsEnabled="True" ToolTip="Load params from XML file." Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="25" Click="Button_XMLOpen">
            <Image Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Source="Resources/Very-Basic-Upload-icon.png"/>
        </Button>
        <Button IsEnabled="True" ToolTip="Store params to XML file." Grid.Column="2" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="25" Click="Button_XMLSave">
            <Image Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Source="Resources/System-Save-icon.png"/>
        </Button>
    </Grid>
</UserControl>
